
import NativeMgr from "../../../../../general/Script/mgr/nativeManager";
import { subGameMgr } from "../../../../../general/Script/mgr/SubGameMgr";
import GameStart from "../../../common/GameStart";
import BaseScene from "../../../expand/ui/BaseScene";
import { SceneType } from "./SceneType";

const { ccclass, property } = cc._decorator;
@ccclass
export default class GameScene extends BaseScene {
    public onLoad(): void {
        GameStart.Start();


        console.log('GameStart = ');
        this.initGame();
    }


    initGame() {
        this.init(SceneType.GameScene);
        cc.director.getPhysicsManager().enabled = true;
        //   cc.director.getPhysicsManager().debugDrawFlags = 
        //     cc.PhysicsManager.DrawBits.e_aabbBit |
        //     cc.PhysicsManager.DrawBits.e_jointBit |
        //     cc.PhysicsManager.DrawBits.e_shapeBit;
        cc.director.getPhysicsManager().gravity = cc.v2(0, 0);
    }


    backHomeBtnCallBack() {
        NativeMgr.Ins().showFullAds();

        cc.director.loadScene("home");
        subGameMgr.exitSubGame();
    }
}
